A machine-to-machine (M2M) communication network consists of each M2M node and each bearer network. M2M nodes implement communication with each other through the bearer network. One M2M node contains at least one Application Entity (AE) or a Common Service Entity (CSE). The application entity is a logical unit that performs the actual M2M applications. The common service entity is a logical unit that manages and serves the application.
The communication between the M2M applications is implemented by the interaction between Common Service Entities (CSEs). The M2M applications are registered to the CSE, the CSMs need to register with each other, and then the interaction of the M2M applications can be implemented through the communication between the CSEs. The M2M system architecture diagram is shown in FIG. 1. In the M2M system architecture, the application node is the end implementation node, such as a smart meter, a temperature measurement and control sensor, a fire alarm, a smart appliance, and etc., the intermediate node is a middleware connecting the end implementation node to the server at the network side, such as gateway, the base node is a server at the network side, and the application registered to the base node can be a management platform of the M2M service provider.
In a practical application, the application entity AE on the application node needs to be registered to the common service entity on the application node, with no need of being registered to the common service entity of the intermediate node and the common service entity of the base node. The CSE to which AE is registered is referred to as a local CSE, and the other CSEs beside that CSE are referred to as remote CSEs. To implement communication between one CSE and another CSE, the CSE shall also be registered on the CSE with which it is to communicate. When CSE1 is registered to CSE2, CSE2 is referred to as local CSE of CSE1. After the registration is complete, AE or CSE may create resources on its local CSE. Typically, the resource created on the local CSE is referred to as the original resource, and the resource created on the remote CSE by way of notification is referred to as the notification resource. In the related technology, when the application on the base node needs to find the application on the application node, a request is sent to all the intermediate nodes connected to the base node. In order to facilitate the intermediate node to find the resource on the application node, a notification resource corresponding to the original resource on the application node is created on the intermediate node by way of resource notification. The notification resource has the same “search label” as that of the original resource, and may be linked to the “original resource address”, so that the intermediate node may conveniently find the desired resource and may be linked to the “original resource address” according to the notification resource to access the original resource. Correspondingly, the attribute of “has been notified to” created on the original resource is used to indicate which remote CSEs the original resource has been notified to.
For example, the application entity AE sends a resource creation request to the local CSE, and the request message contains the resource type parameter and the attribute parameters (attribute 1, attribute 2, . . . ). After the local CSE receives the resource creation request, it creates the application type resource “AE1” for the AE, and creates each attribute according to the indication of the attribute parameters. For example, create attribute 1 of which the attribute name is “application name” and the attribute value is set to “myApplication”, create attribute 2 of which the attribute name is “application ID” and the attribute value is set to “AE-ID”, create attribute 3 of which the attribute name is “has been notified to” and the attribute value will be set after a response returned by the remote CSE is received. That is, first, the notification resource creation request message is sent to the remote CSE address given in the attribute parameter “has been notified to” of the resource creation request. After the remote CSE receives the notification resource creation request message, a notification resource “AE1_Annc” is created on the remote CSE, a response message is sent to the local CSE, and the response message contains the address of the notification resource “AE1_Annc”. After the local CSE receives the response message, it stores the received address of the notification resource in the attribute “has been notified to” of the resource “AE1”.
In the related art, although the notification resource is created on the remote CSE, the attribute of the resource is not created on the remote CSE. Therefore, if the attribute of the resource is queried on the remote CSE, the address of the original resource needs to be linked to complete the query. The query speed is slow, and the efficiency is low.